Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add drain option to dask-worker #8752

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
Open

Conversation

AlecThomson
Copy link

Closes #3141

  • Tests added / passed
  • Passes pre-commit run --all-files

Need some help on adding appropriate tests for this option

@AlecThomson AlecThomson requested a review from fjetter as a code owner July 6, 2024 07:24
@GPUtester
Copy link
Collaborator

Can one of the admins verify this patch?

Admins can comment ok to test to allow this one PR to run or add to allowlist to allow all future PRs from the same author to run.

Copy link
Contributor

github-actions bot commented Jul 6, 2024

Unit Test Results

See test report for an extended history of previous test failures. This is useful for diagnosing flaky tests.

    27 files  ±0      27 suites  ±0   11h 29m 34s ⏱️ - 10m 9s
 4 116 tests ±0   4 003 ✅ ±0    111 💤 ±0  2 ❌ ±0 
51 615 runs  ±0  49 317 ✅ +1  2 296 💤  - 1  2 ❌ ±0 

For more details on these failures, see this check.

Results for commit 75e98c3. ± Comparison against base commit 5589049.

♻️ This comment has been updated with latest results.

@AlecThomson
Copy link
Author

Found that drain was not blocking additional tasks from being scheduled. Fixed with additional call to self.scheduler.retire_workers

Comment on lines +213 to +217
@click.option(
"--drain/--no-drain",
default=False,
help="Let the worker finish its current work before closing [default: --no-drain]",
)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the idea of having a flag you can set which allows workers to complete current tasks without accepting new ones. It's probably most useful when tasks a very large, which is not best practice, but common enough that we should make QoL improvements for those users.

I'm not sure on the drain terminology. In SLURM it means the same thing as it means here, finish existing work without accepting new work. However, in Kubernetes terminology it means evict all current work and reschedule tasks on another worker. So for Dask users in the Kubernetes community this may be confusing.

Perhaps this option could be made mode explicit like --complete-tasks-on-shutdown. Although that's pretty long, so if you can think of something better than that's great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enhancement Request - Dask Workers lifetime option not waiting for job to finish
3 participants